package com.ruyuan.commodity.client;

import com.ruyuan.commodity.api.GoodsTagClient;
import com.ruyuan.commodity.common.mamager.TagsManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 商品标签对外接口实现
 */
@Service
public class GoodsTagClientDefaultImpl implements GoodsTagClient {

    private static final Logger LOG = LoggerFactory.getLogger(GoodsTagClientDefaultImpl.class);

    /**
     * 商品标签的业务类
     */
    @Autowired
    private TagsManager tagsManager;

    /**
     * 增加店铺标签
     * @param sellerId 商家id
     */
    @Override
    public Boolean addShopTags(Long sellerId) {
        try {
            tagsManager.addShopTags(sellerId);
            return true;
        } catch (Exception e) {
            LOG.error("error", e);
            return false;
        }
    }
}
